<template>
	<view>
		<view class="bg">
			LOGIN
		</view>
		<form>
			<view class="cu-form-group">
				<view class="title">账号</view>
				<input placeholder="请输入账号" v-model="username" name="input"></input>
			</view>
			<view class="cu-form-group">
				<view class="title">密码</view>
				<input placeholder="请输入密码" v-model="password" name="input"></input>
			</view>
			<button class="cu-btn block bg-blue margin-tb-sm lg" @click="login" type="">登录</button>
		</form>
	</view>
</template>
<script>
	import { login } from "@/api/login";
	
	export default {
		data() {
			return {
				loginForm:{
					username: "admin",
					password: "admin123",
					code: "WeChat",
				},
		      }
		},
		methods: {
			login: function() {
				login(this.loginForm).then(response => {
					console.log(response)
				});
			}
		}
	}
</script>

<style>
  .bg{
	  width: 100%;
	  height: 50px;
	  font-size: 80rpx;
	  margin-top: 100px;
	  text-align: center;
	  color: #303133;
  }
</style>
